MattMeister.com
  • Blog
  • Papers
  • Code & Data
  • Reviews HOF

On this page

  • Web Scraping — Code and Data
    • Online Reviews
    • Fun / Misc
  • Flexible, Multicore Specification Curve
  • Lasso Regression Example
  • Mediation Model Plotting (Work-in-Progress)

Code & Data

These ain’t perfect… Please let me know of any errors you find!

Web Scraping — Code and Data

Online Reviews

  • TripAdvisor Reviews
    Python code on GitHub

  • REI.com Reviews
    Python and R code on GitHub
    Raw Data on Dropbox
    Data Merged with Weather
    NCEI USA Weather Data

  • VRBO.com Listings and Reviews
    Python code on GitHub
    Data on Dropbox

  • BestBuy.com Aggregate Reviews
    Python code on Dropbox
    Data on Dropbox

Fun / Misc

  • ESPN.com March Madness Brackets
    Python code on GitHub
    Data on Dropbox

Flexible, Multicore Specification Curve

The popular specr package in R is good. However, specr is not super flexible—it does not support fixed-effect regressions, and mixed-effect regressions take some work.

I wanted to create a package that would build on specr while being more user-friendly. To that end, I’m working on this set of functions, which I’ve given the bad title of specster:

  • https://github.com/mattmeist/specster

The current code supports:

  • Four common models: OLS Linear Regression, Logistic Regression, Fixed-Effect Regression, and Linear Mixed-Effect Regression (i.e., lm, glm, lfe::felm, and lmerTest::lmer in R)
  • Setup of models
  • Multicore processing to speed up computation
  • Graphing with ggplot2

Citations:

  • specr package, which my repository borrows some from: https://github.com/masurp/specr
  • Specification Curve Analysis: Simonsohn, U., Simmons, J.P. & Nelson, L.D. (2020). Specification curve analysis. Nature Human Behaviour, 4, 1208–1214. https://doi.org/10.1038/s41562-020-0912-z

Lasso Regression Example

Just an example of Lasso Regression with explanation.
Download this file and open it to view.

Mediation Model Plotting (Work-in-Progress)

This function will draw you a mediation model in ggplot in R. It ain’t awesome, but mediation is kind of silly anyways.
I plan to keep adding to it, as it can only do super simple mediation now.

GitHub Link